<%-- 
    Document   : index
    Created on : Jul 18, 2012, 2:12:04 PM
    Author     : thaodd_b00696
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
<!--        Retrieving the data posted to a JSP file from HTML file-->
        <p>
            <font style="color: dodgerblue; font-size: medium; font-family:Tahoma">
                Welcome : <%=request.getParameter("username")%></font>
        </p>

<!--     Khai bao code java trong JSP bat dau voi <! va jet thuc boi %> -->
        <%!
            int cnt = 0;
            private int getCount(){
            //increment int and return the value
                cnt++;
                return cnt;
            }
        %>

        <p>Value of cnt are : </p>
        <p><%=getCount()%></p>
        <p><%=getCount()%></p>
        <p><%=getCount()%></p>
        <p><%=getCount()%></p>
        <p><%=getCount()%></p>
        <p><%=getCount()%></p>
        <p><%= new java.util.Date() %></p>
    </body>
</html>
